
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type LuckLotteryRequest struct {

	Type string `json:"type" form:"type"`

	Name string `json:"name" form:"name"`

	Desc string `json:"desc" form:"desc"`

	Image string `json:"image" form:"image"`

	Factor string `json:"factor" form:"factor"`

	FactorNum string `json:"factor_num" form:"factor_num"`

	AttendsUser string `json:"attends_user" form:"attends_user"`

	UserLevel string `json:"user_level" form:"user_level"`

	UserLabel string `json:"user_label" form:"user_label"`

	IsSvip string `json:"is_svip" form:"is_svip"`

	PrizeNum string `json:"prize_num" form:"prize_num"`

	StartTime string `json:"start_time" form:"start_time"`

	EndTime string `json:"end_time" form:"end_time"`

	LotteryNumTerm string `json:"lottery_num_term" form:"lottery_num_term"`

	LotteryNum string `json:"lottery_num" form:"lottery_num"`

	SpreadNum string `json:"spread_num" form:"spread_num"`

	IsAllRecord string `json:"is_all_record" form:"is_all_record"`

	IsPersonalRecord string `json:"is_personal_record" form:"is_personal_record"`

	IsContent string `json:"is_content" form:"is_content"`

	Content string `json:"content" form:"content"`

	Status string `json:"status" form:"status"`

	Sort string `json:"sort" form:"sort"`

	IsDel string `json:"is_del" form:"is_del"`

	AddTime string `json:"add_time" form:"add_time"`

}

func (r *LuckLotteryRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *LuckLotteryRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"type": "required",

		"name": "required",

		"desc": "required",

		"image": "required",

		"factor": "required",

		"factor_num": "required",

		"attends_user": "required",

		"user_level": "required",

		"user_label": "required",

		"is_svip": "required",

		"prize_num": "required",

		"start_time": "required",

		"end_time": "required",

		"lottery_num_term": "required",

		"lottery_num": "required",

		"spread_num": "required",

		"is_all_record": "required",

		"is_personal_record": "required",

		"is_content": "required",

		"content": "required",

		"status": "required",

		"sort": "required",

		"is_del": "required",

		"add_time": "required",

	}
}

func (r *LuckLotteryRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *LuckLotteryRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *LuckLotteryRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
